
define(function(require, exports, module) {
	"require:nomunge,exports:nomunge,module:nomunge";
	require("constants_agent.js");
	var wind_async=require('ddf_wind_async');
	var history = require('component-history');
	//加载左边菜单
	 loadMenu("agent");
	
/**
* 
* @param type、
*/	 
exports.init=function(m) {
	history.addHis(this,arguments);
	window.$ddf_index = m;
//	var htmlStr = "";
//	htmlStr += '<div id="content-header">';
//	htmlStr += '<div id="breadcrumb"> <a href=javascript:load("'+ddf.index.index_js+'") title="返回首页" class="tip-bottom"><i class="icon-home"></i> 首页</a> 欢迎进入兑兑付商户管理系统！</div>';
//	htmlStr += '</div>';
//	htmlStr += '<div class="container-fluid">';
//	htmlStr += '<div class="quick-actions_homepage">';
//	htmlStr += '<ul class="quick-actions">';
//
//	htmlStr += '<li id="AGENT_MY_ACCOUNT_JOURNAL_MANAGER" class="bg_lb" style="display:none;"> <a href=javascript:load("'+ddf.account.account_js+'")> <i class="icon-edit"></i> <span class="label label-important"></span> 账户流水</a> </li>';
//	htmlStr += '<li id="AGENT_MY_ACCOUNT_SETTLE_MANAGER" class="bg_lg span3" style="display:none;"> <a href=javascript:load("'+ddf.withDrawSettle.withDraw_js+'")> <i class="icon-inbox"></i>提现</a> </li>';
//	htmlStr += '<li id="AGENT_MY_ACCOUNT_SETTLE_HIS_MANAGER" class="bg_ly span3" style="display:none;"> <a href=javascript:load("'+ddf.withDrawSettle.withDrawSettle_js+'")> <i class="icon-paste"></i><span class="label label-success"></span>提现记录</a> </li>';
//	htmlStr += '<li id="AGENT_MY_INFO_MANAGER" class="bg_lo" style="display:none;"> <a href=javascript:load("'+ddf.agentMessage.agentMessage_js+'")> <i class="icon-user"></i>基本信息</a> </li>';
//	htmlStr += '<li id="AGENT_MY_BANK_MANAGER" class="bg_ls" style="display:none;"> <a href=javascript:load("'+ddf.bank.bank_js+'")> <i class="icon-info-sign"></i>银行账户</a> </li>';
//	htmlStr += '<li id="AGENT_MY_SECURITY_MANAGER" class="bg_ls" style="display:none;"> <a href=javascript:load("'+ddf.safe.safe_js+'")> <i class="icon-info-sign"></i>安全设置</a> </li>';
//	htmlStr += '<li id="AGENT_SHOP_MANAGER" class="bg_lo span3" style="display:none;"> <a href=javascript:load("'+ddf.shop.shop_js+'")> <i class="icon-tint"></i>商家查询</a> </li>';
//	htmlStr += '<li id="AGENT_TERNIMAL_USER_MANAGER" class="bg_ls" style="display:none;"> <a href=javascript:load("'+ddf.operator.operator_js+'")> <i class="icon-credit-card"></i>操作员查询</a> </li>';
//	htmlStr += '<li id="AGENT_TERNIMAL_MONITOR_MANAGER" class="bg_lb" style="display:none;"> <a href=javascript:load("'+ddf.terminalControl.terminalControl_js+'")> <i class="icon-money"></i>终端监控</a> </li>';
//	htmlStr += '</ul>';
//	htmlStr += '</div>';
//	htmlStr += '</div>';
//	htmlStr += '</div>';
//	htmlStr += '<hr/>';
//	htmlStr += '<hr/>';
//	$("#content").html(htmlStr);
//	showOperate();

	document.title="云便利商店-代理商管理后台";
	$("#content").html('<div class="row-fluid"><div class="logon span4" style="margin:20px auto 0; float:none;"><h4><span></span>  您好!</h4><p>欢迎进入云便利商店代理商管理员后台</p></div></div>');

}
   
   function showOperate(){
//	   DDF_AsyncRequest("POST",ddf.index.queryShowOperate,"",'$ddf_index.showOperateCallBack(data)');
	   eval(Wind.compile("async",function(){
			
			var data = $await(wind_async.DDF_AsyncRequest("POST",ddf.index.queryShowOperate,""));
			
			showOperateCallBack(data);
			
		}))().start();
   }
   
   function showOperateCallBack(data){
	   if(data["AGENT_MY_ACCOUNT_JOURNAL_MANAGER"])
			$("#AGENT_MY_ACCOUNT_JOURNAL_MANAGER").css("display","block");
		if(data["AGENT_MY_ACCOUNT_SETTLE_MANAGER"])
			$("#AGENT_MY_ACCOUNT_SETTLE_MANAGER").css("display","block");
		if(data["AGENT_MY_ACCOUNT_SETTLE_HIS_MANAGER"])
			$("#AGENT_MY_ACCOUNT_SETTLE_HIS_MANAGER").css("display","block");
		if(data["AGENT_MY_INFO_MANAGER"])
			$("#AGENT_MY_INFO_MANAGER").css("display","block");
		if(data["AGENT_MY_BANK_MANAGER"])
			$("#AGENT_MY_BANK_MANAGER").css("display","block");
		if(data["AGENT_MY_SECURITY_MANAGER"])
			$("#AGENT_MY_SECURITY_MANAGER").css("display","block");
		if(data["AGENT_SHOP_MANAGER"])
			$("#AGENT_SHOP_MANAGER").css("display","block");
		if(data["AGENT_TERNIMAL_USER_MANAGER"])
			$("#AGENT_TERNIMAL_USER_MANAGER").css("display","block");
		if(data["AGENT_TERNIMAL_MONITOR_MANAGER"])
			$("#AGENT_TERNIMAL_MONITOR_MANAGER").css("display","block");
   }
});
